package com.ruoyi.project.task.postpone.mapper;

import com.ruoyi.project.task.postpone.domain.TaskPostpone;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Pathosis
 * @date 2020-09-18 15:22
 * @description: 延期任务的mapper
 */
@Repository
public interface TaskPostponeMapper {
    /**
     * 查询TaskPostpone
     * @param taskPostpone
     * @return
     */
     List<TaskPostpone> selectAllTaskPostpone(TaskPostpone taskPostpone);

    /**
     * 插入
     * @param taskPostpone
     * @return
     */
    int insertTaskPostpone(TaskPostpone taskPostpone);

    /**
     * 通过id删除延期任务
     * @param postponeIds
     * @return
     */
    int deleteTaskPostponeByIds(Long[] postponeIds);

    /**
     * 根据id查询延期任务对象，用于回显操作
     * @param postponeId
     * @return
     */
    TaskPostpone selectTaskPostponeById(Long postponeId);

    /**
     * 修改延期任务
     * @param taskPostpone
     * @return
     */
    int updateTaskPostpone(TaskPostpone taskPostpone);

    /**
     * 根据missionid和infoid查询Taskpostpone对象
     * @param tp
     * @return
     */
    TaskPostpone selectTaskPostponeByMissionIdAndInfoId(TaskPostpone tp);

    /**
     * 根据missionid删除TaskPostpone对象
     * @param missionId
     * @return
     */
    int deleteTaskPostponeByMission(Long[] missionId);
}
